package top.whysu.study.thinkinjava.chapter9.interfaces.example5;

class Games {
    public static void playGame(GameFactory factory) {
        Game s = factory.getGame();
        while(s.move()) {
            ;
        }
    }

    public static void main(String[] args) {
        playGame(new ChecksFactory());
        playGame(new ChessFactory());
    }
}